#ifndef _ID_MGR_H_
#define _ID_MGR_H_

#ifndef UINTID
#define UINTID unsigned int
#endif

struct id_recycle_item {
  UINTID m_id;
  struct id_recycle_item *m_next;
};

struct id_mgr_table{
  UINTID m_min_id;
  UINTID m_max_id;
  struct id_recycle_item* m_id_recycle;
};

void init_id_mgr(struct id_mgr_table* idmgr, UINTID minid=0);
UINTID getid_id_mgr(struct id_mgr_table* idmgr);
void releaseid_id_mgr(struct id_mgr_table *idmgr, UINTID id);
void clear_id_mgr(struct id_mgr_table *idmgr);

//void print_recycle(struct id_mgr_table *idmgrtbl);

#endif
